package data;

import java.util.ArrayList;

public class TournamentList {
	
	ArrayList<Player> players = null;

	public TournamentList(){
		players = new ArrayList<Player>();
	}
	
	public Player find(String name){
		for(int i = 0; i < players.size(); i++){
			if (players.get (i).name ().equals (name)){
				return players.get (i);
			}
		}				
		return null;
	}
	
	public int size(){
		return players.size ();
	}
	
	public void addPlayer(Player aPlayer){
		players.add (aPlayer);		
	}
	
	public ArrayList<Player> getPlayers(){
		return players;
	}
}
